export default {
  data () {
    return {
      pushMsgList: [
        { label: '是', value: 0 },
        { label: '否', value: 1 }
      ],
      limitList: [
        { label: '次/每天', value: 0 },
        { label: '次/活动全程', value: 1 }
      ],
      timeTypes: [
        { label: '相对时间', value: 0 },
        { label: '指定时间', value: 1 }
      ],
      couponTypeList: [
        { label: '代金券', value: 0 },
        { label: '折扣券', value: 1 },
        { label: '赠币券', value: 2 }
      ],
      originTypeList: [
        { label: '积分兑换', value: 0 },
        { label: '促销活动赠送', value: 1 },
        { label: '活动赠送', value: 2 },
        { label: 'SVIP会员销售', value: 3 }
      ],
      couponStatusList: [
        { label: '未启用', value: 0 },
        { label: '已启用', value: 1 },
        { label: '已停用', value: 2 }
      ],
      typeList: [
        { label: '注册', value: 0 },
        { label: '刮刮乐', value: 1 },
        { label: '大转盘', value: 2 },
        { label: '幸运砸蛋', value: 3 },
        { label: '升级大礼包', value: 10 },
        { label: '分享送红包', value: 11 }
      ],
      sceneList: [
        { label: '消费场景', value: 4 },
        { label: '完善资料', value: 5 }
      ],
      messageActivityList: [
        { label: '注册', value: 0 },
        { label: '升级大礼包', value: 10 },
        { label: '满赠活动', value: 6 },
        { label: '满减活动', value: 7 },
        { label: '折扣活动', value: 8 },
        { label: '定向发券', value: 9 },
        { label: '飞豆活动', value: 20 }
      ],
      // activityTypeList: [
      //   { label: '满赠', value: 6 },
      //   { label: '满减', value: 7 },
      //   { label: '折扣', value: 8 }
      // ],
      activityTypeList: [
        { value: 6, label: '满赠活动' },
        { value: 7, label: '满减活动' },
        { value: 8, label: '折扣活动' }
      ],
      statusList: [
        { label: '未开始', value: 0 },
        { label: '进行中', value: 1 },
        { label: '已结束', value: 2 }
      ],
      channelList: [
        { label: '微信', value: '0' },
        { label: '一体机', value: '1' },
        { label: '收银台', value: '3' }
      ],
      channelRegList: [
        { label: '微信', value: '0' },
        { label: '收银台', value: '3' }
      ],
      categoryList: [
        { label: '游戏币', value: '3' },
        { label: '游戏券', value: '4' },
        { label: '游戏卡', value: '5' },
        { label: '休闲项目', value: '6' },
        { label: '小商品', value: '7' },
        { label: 'SVIP会员', value: '22' }
      ],
      memberMessageList: [
        {
          label: '姓名',
          key: 'POINTS_NAME',
          index: 0,
          val: ''
        },
        {
          label: '性别',
          key: 'POINTS_SEX',
          index: 1,
          val: ''
        },
        {
          label: '生日',
          key: 'POINTS_BIRTHDAY',
          index: 2,
          val: ''
        },
        {
          label: '身份证',
          key: 'POINTS_ID_CARD',
          index: 3,
          val: ''
        },
        {
          label: '教育背景',
          key: 'POINTS_EDUCATION_BACKGROUND',
          index: 4,
          val: ''
        },
        {
          label: '邮箱',
          key: 'POINTS_EMAIL',
          index: 5,
          val: ''
        },
        {
          label: '常住城市',
          key: 'POINTS_CITY',
          index: 6,
          val: ''
        },
        {
          label: '家庭信息',
          key: 'POINTS_FAMILY',
          index: 7,
          val: ''
        },
        {
          label: '添加标签',
          key: 'POINTS_ADD_TAG',
          index: 8,
          val: ''
        }
      ],
      moduleType: [
        { value: 0, label: 'hot专区' },
        { value: 1, label: '积分兑好礼' }
        // { value: 2, label: '等级进阶礼' }
      ],
      templateTypeList: [
        { label: '微信', value: 1 },
        { label: '短信', value: 2 }
      ]
    }
  },
  methods: {
    getEnumsName (value, enums) {
      const result = enums.filter(item => item.value === value)
      return result[0] ? result[0].label : ''
    },
    formatTime (timeString) {
      timeString = timeString || ''
      const splits = timeString.split(' ')
      return splits[0].replace(/-/g, '/')
    }
  }
}
